package array;

public class t111 {

  /*  public static void main(String[] args) {
        String s1 = new String("Hydra");
        String s2 = s1.intern();
        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());

        System.out.println(s1 == s2);

        System.out.println(s1.equals(s2));

        System.out.println(s1 == "Hydra");

        System.out.println(s2 == "Hydra");

    }*/
  public static void main(String[] args) {
      String h ="hello";
      String h1 ="he"+"llo";
      final String h2 = h;
      String s = h2 + "Hydra";
      System.out.println(h==h1);
      System.out.println(h==h2);
      System.out.println(s=="helloHydra");
  }
}